package com.syedu.day03.homework;

/**
 * description：有一百匹马，驮一百担货，大马驮3担，中马驮2担，两只小马驮1担，问有大，中，小马各几匹？
 */
public class Exercise5 {
    public static void main(String[] args) {
        int count = 0;
        for (int x = 0; x < 34; x++) {
            for (int y = 0; y <= 50; y++) {
                for (int z = 0; z <= 100; z++) {
                    if (x + y + z == 100 && 3 * x + 2 * y + z * 0.5 == 100) {
                        count++;
                        System.out.println("大马: " + x + ",中马: " + y + ",小马: " + z);
                    }
                }
            }
        }
        System.out.println(count);
    }
}